<template>
  <el-card :bordered="false" class="storeOrderDetails">
    <el-page-header @back="$router.go(-1)" style="margin-bottom:10px"></el-page-header>
    <el-form
      :model="ruleForm"
      :rules="rules"
      ref="ruleForm"
      :labelWidth="labelWidth"
      class="demo-ruleForm"
    >
      <!-- 采购入库    1.平台自建采购单入总仓详情  2.门店采购单关联入库单-->
      <div>
        <el-card
          class="box-card"
          shadow="never"
          style="margin: 20px 0;background-color:rgba(215, 215, 215, 0.5);"
        >
          <div slot="header" class="clearfix">
            <h3 class="header_title">{{ruleForm.inStockStatus | inStockStatus}}</h3>
            <!-- <h3 class="header_title" v-if="ruleForm.inStockStatus == '00'">待入库</h3>
            <h3 class="header_title" v-if="ruleForm.inStockStatus == '01'">部分入库</h3>
            <h3 class="header_title" v-if="ruleForm.inStockStatus == '02'">已完成</h3> -->
          </div>
          <el-row :gutter="10">
            <div>
              <el-col :xs="8" :md="8">
                <el-form-item label="采购订单：">{{ruleForm.purchaseInfoId}}</el-form-item>
              </el-col>
              <el-col :xs="8" :md="8">
                <el-form-item label="创单人：">{{ruleForm.operatorId}}</el-form-item>
              </el-col>
              <el-col :xs="8" :md="8">
                <el-form-item label="制单时间：">{{ruleForm.createTime}}</el-form-item>
              </el-col>
              <!-- <div v-if="true">
                <el-col :xs="8" :md="8">
                  <el-form-item label="入库日期：">{{ruleForm.distributionTime}}</el-form-item>
                </el-col>
                <el-col :xs="8" :md="8">
                  <el-form-item label="入库凭证：">
                    <el-image
                      style="width: 100px; height: 100px"
                      :src="url"
                      :preview-src-list="srcList"
                    ></el-image>
                  </el-form-item>
                </el-col>
                <el-col :xs="8" :md="8">
                  <el-form-item label="备注：">{{}}</el-form-item>
                </el-col>
              </div> -->
            </div>
          </el-row>
        </el-card>

        <el-row :gutter="10" class="dingdanInfo">
          <el-col :xs="8" :md="8">
            <el-card class="box-card" shadow="never" style="height:235px">
              <div slot="header" class="clearfix">
                <span>入库信息</span>
              </div>
              <el-row :gutter="10">
                <el-col :xs="24" :md="24">
                  <span class="dingdanInfo_span">入库方：</span>
                  <span class="dingdanInfo_span_value">{{ruleForm.platformName}}</span>
                </el-col>
                <el-col :xs="24" :md="24">
                  <span class="dingdanInfo_span">联系电话：</span>
                  <span class="dingdanInfo_span_value">{{ruleForm.contactsNum}}</span>
                </el-col>
                <el-col :xs="24" :md="24">
                  <span class="dingdanInfo_span">联系人：</span>
                  <span class="dingdanInfo_span_value">{{ruleForm.contacts}}</span>
                </el-col>
                <el-col :xs="24" :md="24">
                  <span class="dingdanInfo_span">入库地址：</span>
                  <span class="dingdanInfo_span_value">{{ruleForm.inStockAdress}}</span>
                </el-col>
              </el-row>
            </el-card>
          </el-col>
          <el-col :xs="8" :md="8">
            <el-card class="box-card" shadow="never" style="height:235px">
              <div slot="header" class="clearfix">
                <span>供应商信息</span>
              </div>
              <el-row :gutter="10">
                <el-col :xs="24" :md="24">
                  <span class="dingdanInfo_span">供应商：</span>
                  <span class="dingdanInfo_span_value">{{ruleForm.supplierName}}</span>
                </el-col>
                <el-col :xs="24" :md="24">
                  <span class="dingdanInfo_span">联系电话：</span>
                  <span class="dingdanInfo_span_value">{{ruleForm.supplierNum}}</span>
                </el-col>
                <el-col :xs="24" :md="24">
                  <span class="dingdanInfo_span">联系人：</span>
                  <span class="dingdanInfo_span_value">{{ruleForm.supplierContacts}}</span>
                </el-col>
              </el-row>
            </el-card>
          </el-col>
          <el-col :xs="8" :md="8">
            <el-card class="box-card" shadow="never" style="height:235px">
              <div slot="header" class="clearfix">
                <span>配送信息</span>
              </div>
              <el-row :gutter="10">
                <el-col :xs="24" :md="24">
                  <span class="dingdanInfo_span">配送状态：</span>
                  <span class="dingdanInfo_span_value">{{ruleForm.distributionStatus | distributionStatus}}</span>
                </el-col>
                <!-- <el-col :xs="24" :md="24" v-if="true">
                  <span class="dingdanInfo_span">配送时间：</span>
                  <span class="dingdanInfo_span_value">{{}}</span>
                </el-col> -->
                <el-col :xs="24" :md="24">
                  <span class="dingdanInfo_span">发出时间：</span>
                  <span class="dingdanInfo_span_value">{{ruleForm.distributionTime}}</span>
                </el-col>
              </el-row>
            </el-card>
          </el-col>
        </el-row>

        <!-- 商品明细 -->
        <el-card class="box-card" shadow="never" style="margin-bottom: 20px;">
          <div slot="header" class="clearfix">
            <h3>商品明细</h3>
          </div>
          <!-- <el-row :gutter="10" style="margin:0" v-if="true">
            <el-card shadow="never">
              <el-col :xs="8" :md="8">
                <el-form-item label="门店名称："></el-form-item>
              </el-col>
              <el-col :xs="8" :md="8">
                <el-form-item label="创单人："></el-form-item>
              </el-col>
              <el-col :xs="8" :md="8">
                <el-form-item label="制单时间："></el-form-item>
              </el-col>
              <el-col :xs="8" :md="8">
                <el-form-item label="门店采购单："></el-form-item>
              </el-col>
              <el-col :xs="8" :md="8">
                <el-form-item label="门店地址："></el-form-item>
              </el-col>
              <el-col :xs="8" :md="8">
                <el-form-item label="联系人："></el-form-item>
              </el-col>
              <el-col :xs="8" :md="8">
                <el-form-item label="联系人手机号："></el-form-item>
              </el-col>
              <el-col :xs="8" :md="8">
                <el-form-item label="备注："></el-form-item>
              </el-col>
            </el-card>
          </el-row> -->
          <buyingIfor
            ref="buyingIfor"
            style="margin:20px 0px 0px 0px"
            :loadData="ruleForm.inStockGoodsDetailDto"
          />
        </el-card>

        <div class="content">
          <!-- <el-button @click="save('ruleForm')" type="primary" v-if="!status">入库</el-button> -->
          <el-button @click="quxiao('ruleForm')">返 回</el-button>
        </div>
      </div>
    </el-form>
  </el-card>
</template>

<script src='./index.js'></script>

<style lang="scss">
.storeOrderDetails {
  .content {
    text-align: center;
    margin: 20px 0px;
    button {
      margin-right: 10px;
    }
  }
  .mdweizhi {
    display: flex;
    .jwd {
      span {
        padding-right: 10px;
      }
      .el-form-item__label {
        text-align: right;
        width: 50px !important;
      }
      .el-form-item__content {
        margin-left: 0px !important;
        margin-right: 20px;
      }
    }
  }
  .box-card {
    .header_title {
      background: rgba(102, 204, 102, 1);
      display: inline-block;
      padding: 5px 10px;
      color: #fff;
    }
    .title {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    h3 {
      margin: 0;
    }
  }
  .dingdanInfo {
    margin-bottom: 12px;
    .dingdanInfo_span {
      display: inline-block;
      width: 120px;
      font-size: 16px;
    }
  }
}
</style>
